{extend name="layout/layout" /}

{block name="pagecss"}
{/block}

{block name="content"}

<div class="row js-check-wrap">
    <div class="col-lg-12">
        <div class="portlet-body">
            <div class="form-horizontal message-form">
                <div class="form-group">
                    <label class="col-md-2 control-label" style="padding-top: 0px">达达配送费余额：</label>
                    <div class="col-md-6">
                        <div class="relative package">
                            <div class="form-group">
                                <div class="form-inline">
                                    <span class="margin-left">{$dadaBalance}</span>
                                    <span class="margin-left">元</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-2 control-label" style="padding-top: 0px">平台消费余额：</label>
                    <div class="col-md-6">
                        <div class="relative package">
                            <div class="form-group">
                                <div class="form-inline">
                                    <span class="margin-left">{$balance}</span>
                                    <span class="margin-left">元</span>
                                </div>
                            </div>
                        </div>
                        <br>
                    </div>
                </div>
                <form id="smsForm" class="form">
                    <div class="form-group" style="margin-top: -10px;">
                        <label class="col-md-2 control-label"><span class="required">* </span> 输入充值金额：</label>
                        <div class="col-md-6">
                            <div class="relative package">
                                <div class="form-group">
                                    <div class="form-inline">
                                        <span class="margin-left"><input class="form-control" id="blance"  type="text" value="" name="blance"  onkeyup="onlyNumber(this)"/></span>
                                        <span class="margin-left">元</span>
                                    </div>
                                </div>
                            </div>
                            <br>
                        </div>
                    </div>

                    <div class="form-group" style="margin-top: -14px;margin-bottom: 0">
                        <label class="col-md-2 control-label"><span class="required">* </span> 选择充值类型：</label>
                        <div class="col-md-6">
                            <div class="">
                                <div class="form-group" style="padding-top: 5px">
                                    <div class="">
                                    <span class="margin-left">
                                        <input class="payType form-md-radios" type="radio" checked value="2"  name="serviceType"/>
                                    </span>
                                        <span class="margin-left">达达配送</span>

                                        <span class="margin-left">
                                        <input class="payType form-md-radios" type="radio" value="1" name="serviceType"/>
                                    </span>
                                        <span class="margin-left">平台消费</span>
                                    </div>
                                </div>
                            </div>
                            <br>
                        </div>
                    </div>

                    <!--<div class="form-group">-->
                        <!--<label class="col-md-2 control-label"><span class="required">* </span> 选择充值门店：</label>-->
                        <!--<div class="col-md-2">-->
                            <!--<div class="relative package">-->
                                <!--<select class="form-control" name="storeId">-->
                                    <!--{volist name='store' id='vo'}-->
                                    <!--<option value="{$vo.id}">{$vo.name}</option>-->
                                    <!--{/volist}-->
                                <!--</select>-->
                            <!--</div>-->
                            <!--<br>-->
                        <!--</div>-->
                    <!--</div>-->
                    <!-- 	 <div class="form-group">
                            <label class="col-md-2 control-label"><span class="required">* </span> 选择支付方式：</label>
                            <div class="col-md-5">
                                <div class="relative method">
                                    <label class="radio-inline"><input type="radio" value="支付宝" name="payMethod" checked />支付宝</label>
                                    <label class="radio-inline"><input type="radio" value="微信支付" name="payMethod" />微信支付</label>
                                    <label class="radio-inline"><input type="radio" value="网银" name="payMethod" />网银</label>
                                </div>
                            </div>
                        </div>  -->
                </form>
                <div class="form-group">
                    <div class="col-md-2"></div>
                    <div class="col-md-5">
                        <button type="button" class="btn yellow pull-left margin-top-20 margin-bottom-15" id="buybtn" data-toggle="modal" data-target="#WeChat">立即支付</button>
                        <div class="col-md-8"><span class="help-block "></span></div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-2 control-label"></label>
                    <div class="col-md-5">
                        <p class="color9">
                            1.充值后不支持退款；<br>
                            2.达达配送：是指商家用于达达配送的费用，平台消费：是指商家用于开店的费用。两者不可混用<br>
                            3.充值后可于次月10日后开票，开票金额为套餐包购买金额；<br>
                            4.务必确保服务费用充足，否则将影响达达配送等功能的正常使用；<br>
                            5.活动最终解释权归秒讯科技所有
                        </p>
                    </div>
                </div>
            </div>
            <div class="caption font-dark">
                <h4 class="caption-subject bold uppercase">
                    充值记录
                </h4>
                <div id="table_order_wrapper" class="dataTables_wrapper no-footer">
                    <div class="tabContainer">
                        <table id="data-table" class="table table-bordered table-hover dataTable">
                            <thead>
                            <th>订单号</th>
                            <th>支付流水号</th>
                            <th>支付方式</th>
                            <th>支付金额(元)</th>
                            <th>充值类型</th>
                            <th>交易时间</th>
                            </thead>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 弹框 -->
<div class="modal fade" id="Alipay" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"></button>
                <h4 class="modal-title">支付宝</h4>
            </div>
            <div class="modal-body text-center">
                <p>请使用支付宝扫一扫<br>扫描二维码支付</p>
            </div>
            <div class="modal-footer" style="text-align: center;">
                <button type="button" class="btn default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="WeChat" data-backdrop="static" data-keyboard="false" style="display: none;">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"></button>
                <h4 class="modal-title">微信支付</h4>
            </div>
            <div class="modal-body text-center">
                <img id="wximg" width="300" src="">
                <p>请使用微信扫一扫<br>扫描二维码支付</p>
            </div>
            <div class="modal-footer" style="text-align: center;">
                <button type="button" class="btn default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="bank" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"></button>
                <h4 class="modal-title">网银支付</h4>
            </div>
            <div class="modal-body">
                <div class="col-md-12 tabContainer">
                    <p>请付款至以下对公账户</p>
                    <table class="table dataTable no-footer">
                        <tbody>
                        <tr>
                            <td>收方帐号</td>
                            <td>123456720010601</td>
                        </tr>
                        <tr>
                            <td>开户银行</td>
                            <td>建设银行雄楚路支行</td>
                        </tr>
                        <tr>
                            <td>公司名称</td>
                            <td>湖北秒讯科技股份有限公司</td>
                        </tr>
                        <tr>
                            <td>金额</td>
                            <td>1000元</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="modal-footer" style="text-align: center;">
                <button type="button" class="btn green" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>

<input type="hidden" class="datalist_url" value="{:url('admin/tenant/getRechargeLogList')}">
{/block}

{block name="pagescript"}
<script src="__STATIC__/admin/pages/js/tenant.js" type="text/javascript"></script>
{/block}